/*
 * @Author: Snow
 * @Date: 2021-11-09 16:16:26
 * @Description: 
 */
import { Type } from "typescript";
import { TemplateDrawMore } from "./webgl/template/TemplateDrawMore";
import { TemplateLookCamera } from "./webgl/template/TemplateLookCamera";
import { TemplatePicking } from "./webgl/template/TemplatePicking";
import { TemplateProjection } from "./webgl/template/TemplateProjection";
import { TemplateProjection2 } from "./webgl/template/TemplateProjection2";
import { TemplateShader1 } from "./webgl/template/TemplateShader1";
import { TemplateShader2 } from "./webgl/template/TemplateShader2";
import { TemplateSunSystem } from "./webgl/template/TemplateSunSystem";
import { TemplateSunSystem2 } from "./webgl/template/TemplateSunSystem2";
import { TemplateTest } from "./webgl/template/TemplateTest";
import { TemplateText3D } from "./webgl/template/TemplateText3D";
import { TemplateText3DAtlas } from "./webgl/template/TemplateText3DAtlas";
import { Texture3DF } from "./webgl/texture/Texture3DF";
import { TextureBone1 } from "./webgl/texture/TextureBone1";
import { TextureBoneMatrixTexture } from "./webgl/texture/TextureBoneMatrixTexture";
import { TextureBoneSkin } from "./webgl/texture/TextureBoneSkin";
import { TextureCube } from "./webgl/texture/TextureCube";
import { TextureCubeMap } from "./webgl/texture/TextureCubeMap";
import { TextureDataPix } from "./webgl/texture/TextureDataPix";
import { TextureDrawImage1 } from "./webgl/texture/TextureDrawImage1";
import { TextureDrawImage2 } from "./webgl/texture/TextureDrawImage2";
import { TextureDrawImage3 } from "./webgl/texture/TextureDrawImage3";
import { TextureEnvironmentCubeMap } from "./webgl/texture/TextureEnvironmentCubeMap";
import { TextureFog } from "./webgl/texture/TextureFog";
import { TextureMatrixStack1 } from "./webgl/texture/TextureMatrixStack1";
import { TextureMatrixStack2 } from "./webgl/texture/TextureMatrixStack2";
import { TextureSkyBox } from "./webgl/texture/TextureSkyBox";
import { Webgl2DMatrix3 } from "./webgl/Webgl2DMatrix3";
import { Webgl2DTexture2Image } from "./webgl/Webgl2DTexture2Image";
import { Webgl2DTextureSimple } from "./webgl/Webgl2DTextureSimple";
import { Webgl2DTextureSimple2 } from "./webgl/Webgl2DTextureSimple2";
import { Webgl2DTranslation } from "./webgl/Webgl2DTranslation";
import { Webgl3DCharF } from "./webgl/Webgl3DCharF";
import { Webgl3DCharFDirectionLight } from "./webgl/Webgl3DCharFDirectionLight";
import { Webgl3DCharFPerspective } from "./webgl/Webgl3DCharFPerspective";
import { Webgl3DCharFPointLight } from "./webgl/Webgl3DCharFPointLight";
import { Webgl3DCharFPointLight2 } from "./webgl/Webgl3DCharFPointLight2";
import { Webgl3DCharFPointLight3 } from "./webgl/Webgl3DCharFPointLight3";
import { Webgl3DCharFViewCamara } from "./webgl/Webgl3DCharFViewCamara";
import { Webgl3DCharFViewProject } from "./webgl/Webgl3DCharFViewProject";

/*
 * @Author: Snow
 * @Date: 2021-11-09 16:16:26
 * @Description: 类工具
 */
export class ClassUtil{

    private static classMap:{[key:string]:typeof Function} = {};
    
    public static init():void{
        ClassUtil.regByClass(TemplateDrawMore);
        ClassUtil.regByClass(TemplatePicking);
        ClassUtil.regByClass(TemplateLookCamera);
        ClassUtil.regByClass(TemplateProjection);
        ClassUtil.regByClass(TemplateProjection2);
        ClassUtil.regByClass(TemplateShader1);
        ClassUtil.regByClass(TemplateShader2);
        ClassUtil.regByClass(TemplateSunSystem);
        ClassUtil.regByClass(TemplateSunSystem2);
        ClassUtil.regByClass(TemplateTest);
        ClassUtil.regByClass(TemplateText3D);
        ClassUtil.regByClass(TemplateText3DAtlas);


        
        ClassUtil.regByClass(Texture3DF);
        ClassUtil.regByClass(TextureBone1);
        ClassUtil.regByClass(TextureBoneMatrixTexture);
        ClassUtil.regByClass(TextureCubeMap);
        ClassUtil.regByClass(TextureBoneSkin);
        ClassUtil.regByClass(TextureCube);
        ClassUtil.regByClass(TextureDataPix);
        ClassUtil.regByClass(TextureDrawImage1);
        ClassUtil.regByClass(TextureDrawImage2);
        ClassUtil.regByClass(TextureDrawImage3);
        ClassUtil.regByClass(TextureEnvironmentCubeMap);
        ClassUtil.regByClass(TextureFog);
        ClassUtil.regByClass(TextureMatrixStack1);
        ClassUtil.regByClass(TextureMatrixStack2);
        ClassUtil.regByClass(TextureSkyBox);

        ClassUtil.regByClass(Webgl2DMatrix3);
        ClassUtil.regByClass(Webgl2DTexture2Image);
        ClassUtil.regByClass(Webgl2DTextureSimple);
        ClassUtil.regByClass(Webgl2DTextureSimple2);
        ClassUtil.regByClass(Webgl2DTranslation);
        ClassUtil.regByClass(Webgl3DCharF);
        ClassUtil.regByClass(Webgl3DCharFDirectionLight);
        ClassUtil.regByClass(Webgl3DCharFPerspective);
        ClassUtil.regByClass(Webgl3DCharFPointLight);
        ClassUtil.regByClass(Webgl3DCharFPointLight2);
        ClassUtil.regByClass(Webgl3DCharFPointLight3);
        ClassUtil.regByClass(Webgl3DCharFViewCamara);
        ClassUtil.regByClass(Webgl3DCharFViewProject);
    }

    public static regByName(name:string ,cla:any):void{
        this.classMap[name] = cla;
    }

    public static regByClass(cla:any):void{
        this.classMap[cla.name] = cla;
    }

    public static getClass(name:string):any{
        return this.classMap[name];
    }
}